home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
PRG
/
Z80ppc 160.sit
/
Z80ppc 160
/
KIO.h
< prev
next >
Wrap
Text File
|
1995-11-06
|
3KB
|
73 lines
/* KIO's standard header file.
I cannot life without it.
Copyright (C) 1995 G.Woigk
This file is free software
See application.c for details
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
// ---- Data type definitions ---------------------------------------------
typedef unsigned char Char;
typedef unsigned short Short;
typedef unsigned long Long;
// ---- Constants ---------------------------------------------------------
#define true 1
#define false 0
#define yes 1
#define no 0
#define on 1
#define off 0
// ---- Error numbers -----------------------------------------------------
#define ok 0 // no error
#define error -1 // general error
#define oomem 'kx01' // memory overflow
#define oorange 'kx02' // argument out of range (general)
#define badref 'kx03' // Handle, pointer, or reference number is illegal
#define badsize 'kx04' // argument out of range (size)
#define badidx 'kx05' // Array index out of range
#define empty 'kx06' // tried to retrieve element from empty list/queue/stack
// ---- Nice defines -------------------------------------------------------
#define min(a,b) ( (a)<(b) ? (a) : (b) )
#define max(a,b) ( (a)>(b) ? (a) : (b) )
#define minmax(a,n,e) ( (n)<=(e) ? ((n)>=(a)?(n):(a)) : (e) )
#define abort(s,t,u) { ParamText(s,t,u,"¥p"); Alert(666,nil); ExitToShell(); }
#define abort_oomem(s) { ParamText("¥pOut of memory:",s,"¥p","¥p"); Alert(666,nil); ExitToShell(); }
// ---- Standard functions & associated data -------------------------------
// checkgestalt.c
extern CheckGestalt ( );
extern Boolean powerMgr; // Power manager present?
// ---- pollevents.c -------------------------------------------------------
extern InitAppleEvents ( );
extern PollEvents ( short evMask, long evDelay, RgnHandle evRegion );
extern EventRecord event;
extern Boolean done; // Quit application?
// ---- mem.c --------------------------------------------------------------
#define memcmp mymemcmp // use my own functions instead of ansi library
#define memcpy mymemcpy
#define memmove mymemmove
#define memchr mymemchr
#define memset mymemset
void* memmove ( void *zz, const void *qq, long n );
void* memcpy ( void *zz, const void *qq, long n );
long memcmp ( const void *zz, const void *qq, long n );
void* memchr ( const void *zz, Char c, long n );
void* memset ( void *zz, Char c, long n );
// ---- windowutilities.c --------------------------------------------------
extern DisplayWindow ( WindowPtr w );